]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
VolumeMenu: read output and input if PulseAudio is already ready when constructing
authorGiovanni Campagna <gcampagna@src.gnome.org>
Tue, 4 Sep 2012 15:55:26 +0000 (17:55 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Tue, 4 Sep 2012 21:52:41 +0000 (23:52 +0200)
Previously we would only read the default sink and default source when
the connection to PulseAudio succeded. This worked because all VolumeMenu
users where initialized synchronously during shell load.
With the recent session mode changes though, the lock screen menu is
created on demand, and when it loads PA is already connected, so
it doesn't update the sliders.

https://bugzilla.gnome.org/show_bug.cgi?id=683156

js/ui/status/volume.js

index e0bebede237b6b58f5fea6a2db7c222522f1f2d4..e96b65cb41419a38b2f88f8c828294affc442fc7 100644 (file)
@@ -62,6 +62,11 @@ const VolumeMenu = new Lang.Class({
         this._inputSlider.connect('drag-end', Lang.bind(this, this._notifyVolumeChange));
         this.addMenuItem(this._inputTitle);
         this.addMenuItem(this._inputSlider);
+
+        if (this._control.get_state() == Gvc.MixerControlState.READY) {
+            this._readOutput();
+            this._readInput();
+        }
     },
 
     scroll: function(direction) {